Unit Gravarec;


Interface


uses


Crt,Dos,Printer,Graph,ADC,EXTDR,GlobVar,
CalNVC,escreva,show,LeCelula,graveArquivo,escrever,
Mov,Iniciar,desenhaT,acerta;



Procedure Grava;
Procedure Recupera;
Procedure Recupera2;
Procedure RecuperaCon;
Procedure RecuperaCDon(mm  :  integer);
Procedure CursorXY( x,y : integer);
Procedure DeleteMemoria;




IMplementation


Procedure CursorXY( x,y : integer);

begin
     setcolor(3);
     Line(x,y-5,x,y+5);
     line(x-1,y,x+1,y);
     setcolor(15);
end;





Procedure Grava;


var jj,ii   :   integer;
    temp :   integer;
    localesp  :  array[1..7] of char;
    localganho : array[1..7] of byte;
    olda  :  integer;

begin
{apresenta onda na tela}

  mostra;


{transfere variaveis para local}
  with nervou do begin
  for jj:=1 to 7 do localesp[jj]:=esp[jj];
  Localesp[Imem]:=Oldchoice;
  MemI[Imem,5]:=IescX;
  MemI[Imem,6]:=IescY;
  memI[Imem,7]:=ganho;
  nRate[Imem]:=Irate;
  nDur[Imem]:=Iduration;


{guarda posicao}
 If iniciada then begin
   PtY[Imem]:=a;
 end else If abs(PtY[Imem])>200 then PtY[Imem]:=-120+20*Imem;


{escreve branco sobre a memoria atual}
  setFillStyle(9,9);
  WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
  WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,Localesp[Imem]);

{Transfere dados do buffer para a memoria}
  if (EscX[IescX]>10) then
  for jj:=1 to 1644 do Mem[jj,Imem]:=buffer[u+2*jj]
  else
  for jj:=1 to 1644 do Mem[jj,Imem]:=buffer[u+jj];



{incrementa memoria}
  If Imem<8 then Imem:=Imem+1;
  If (Imem=8) or (Imem>8) then
      begin
      Imem:=7;
      indicador:=false;
      beep(1000);
     end;


{marca a memoria em questao}
  setcolor(6);
  WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
  WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,localesp[Imem]);

{redefine o especificador}
 If MemI[Imem,5]<>0 then begin
     setfillstyle(11,9);
     If (localesp[Imem]=' ') or (localesp[Imem]=#0)  then
      begin
        ch:=oldchoice;
        exit;
      end else begin
        ch:=localesp[Imem];
        oldchoice:=ch;
      end;

{Redefine Escalas}
     IEscX:=round(memI[Imem,5])-1;
     ChangeX;

     IescY:=round(memI[Imem,6]);
     ganho:=round(memI[Imem,7]);

     DefineCalibracaoY;

     MudaY;

     If nRAte[Imem]>Irate then begin
       Irate:=nRate[Imem]-1;
       aumentaRate;
      end;
     If (nRate[Imem]<Irate) then begin
       Irate:=nrate[Imem]+1;
       diminueRate;
       end;
     If nDur[Imem]>Iduration then begin
      Iduration:=nDur[Imem]-1;
      aumentaDuration;
      end;
     If (nDur[Imem]-IDuration)<0 then begin
       IDuration:=nDur[Imem]+1;
       diminueDuration;
       end;

  {transfere os especificadores}
     for jj:=1 to 7 do nervou.esp[jj]:=localesp[jj];
     Oldchoice:=localesp[Imem];
     setFillStyle(0,1);
     setcolor(15);


     Marcaescolha;
 end;
   { Mostra;}
  for jj:=1 to 7 do nervou.esp[jj]:=localesp[jj];
  end;
  beep(5000);
  setcolor(15);


 If  escapeRP then
   begin
          If (escX[IescX]>10) then
           begin
             Indicador:=True;
             for ii:=1 to 1650 do buffer[u+2*ii]:=nervou.Mem[ii,Imem];
          end else
             begin
               Indicador:=true;
               for ii:=1 to 1650 do buffer[u+ii]:=nervou.Mem[ii,Imem];
             end;
      setcolor(6);
      setfillstyle(9,9);
      WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
      WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,nervou.esp[Imem]);
   end;

    if nervou.esp[Imem]<>#0 then a:=nervou.PtY[Imem]
    else a:=0;


 begin
         {setcolor(Imem);}
         { case nervou.mem[1650,imem] of
               10000  :  setcolor(15);
               5000   :  setcolor(4);
               3000   :  setcolor(3);
             end;
            mostra;
            end;}
    setcolor(15);
    Mostra;
  end;

 {if iniciada then a:=nervou.PtY[Imem];}

   if nervou.esp[Imem]<>#0 then a:=nervou.PtY[Imem]
   else a:=0;

 setfillstyle(1,0);
 setcolor(15);
 iniciada:=false;


end;





(***********************************************
Procedure Grava;

var jj   :   integer;
    temp :   integer;
    localesp  :  array[1..7] of char;
    localganho : array[1..7] of byte;
    olda  :  integer;

begin
  mostra;
  with nervou do begin
  for jj:=1 to 7 do localesp[jj]:=esp[jj];
  Localesp[Imem]:=Oldchoice;
  MemI[Imem,5]:=IescX;
  MemI[Imem,6]:=IescY;
  memI[Imem,7]:=ganho;


  {for jj:=1 to 7 do  MemI[jj,7]:=localganho[jj];}


  If iniciada then begin
     PtY[Imem]:=a;
     iniciada:=false;
  end else If abs(PtY[Imem])>200 then PtY[Imem]:=-120+20*Imem;
  nRate[Imem]:=Irate;
  nDur[Imem]:=Iduration;
  {dividida[Imem]:=dividido;}
  {If (nervou.dividida[1]) and (Imem<2) then Out_Port_2(13) else out_port_2(8);}
  setFillStyle(9,9);
  WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
  WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,Localesp[Imem]);
  if (EscX[IescX]>10) then
  for jj:=1 to 1650 do Mem[jj,Imem]:=buffer[u+2*jj]
  else
  for jj:=1 to 1650 do Mem[jj,Imem]:=buffer[u+jj];
  localesp[Imem]:=oldchoice;
  If Imem<8 then Imem:=Imem+1;
  If (Imem=8) or (Imem>8) then
      begin
      Imem:=7;
      indicador:=false;
      beep(1000);
     end;
  WriteText(PosX+310,pos2Y+PosY2janCont+(Imem)*h,localesp[Imem]);
  setcolor(6);
  WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
  WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,localesp[Imem]);
  If MemI[Imem,5]<>0 then begin
     setfillstyle(11,9);
     If (localesp[Imem]=' ') or (localesp[Imem]=#0)  then
      begin
        ch:=oldchoice;
        exit;
      end else begin
        ch:=localesp[Imem];
        oldchoice:=ch;
      end;
     IEscX:=round(memI[Imem,5])-1;
     IescY:=round(memI[Imem,6]);
     ganho:=round(memI[Imem,7]);
     If nRAte[Imem]>Irate then begin
       Irate:=nRate[Imem]-1;
       aumentaRate;
      end;
     If (nRate[Imem]<Irate) then begin
       Irate:=nrate[Imem]+1;
       diminueRate;
       end;
     If nDur[Imem]>Iduration then begin
      Iduration:=nDur[Imem]-1;
      aumentaDuration;
      end;
     If (nDur[Imem]-IDuration)<0 then begin
       IDuration:=nDur[Imem]+1;
       diminueDuration;
       end;
     for jj:=1 to 7 do nervou.esp[jj]:=localesp[jj];
     Oldchoice:=localesp[Imem];
     setFillStyle(0,1);
     setcolor(15);
    { CorrigeY;}


     DefineCalibracaoY;
    {NewGain:=ganho;
        If oldgain<>newgain then begin
           ganho:=newgain;
           If OldGain=-1 then out_Port_2(13);
           If ganho <> -1 then adganho(bd,ganho)
           else begin
                  adganho(bd,0);
                  Out_Port_2(5);
                 end;
           end;}
     ChangeX;
     MudaY;
     Marcaescolha;
    end;
   { Mostra;}
  for jj:=1 to 7 do nervou.esp[jj]:=localesp[jj];
  end;
  beep(5000);
  setcolor(15);
  mostra;
end;
*****************************)

Procedure DeleteMemoria;

var
  jj   :   integer;

begin
  for jj:=1 to 1650 do nervou.Mem[jj,Imem]:=0;
  nervou.distancia[Imem]:=0;
  nervou.esp[Imem]:=' ';
  for jj:=1 to 4 do nervou.dados[jj,Imem]:='';
  for jj:=1 to 7 do nervou.MemI[Imem,jj]:=0;

{  WriteText(PosX+275,pos2Y+PosY2janCont+(Imem)*h,real0str(nervou.distancia[Imem]))}

end;





Procedure Recupera;

var ii : integer;
    jj  :  integer;
    LocalEsp  :  array[1..7] of char;
    oldgain,newgain  :  integer;
    OldMem    :  Integer;
    OldDur    :  Integer;
    OldRate   :  Integer;

begin
    u:=0;
    oldgain:=ganho;
    If abs(Imem)>7 then Imem:=1;
    Mostra;
    with nervou do begin
     for jj:=1 to 7 do localesp[jj]:=esp[jj];
    Fixar:=false;
    setcolor(15);
    setFillStyle(9,9);
    WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
    WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,Localesp[Imem]);
    setcolor(6);
        If (Imem=7) and (not indicador) then
      begin
          If (escX[IescX]>10) then begin
             Indicador:=True;
             for ii:=1 to 1650 do begin
                  buffer[u+2*ii]:=Mem[ii,Imem];
                  buffer[u+2*ii+1]:= round((buffer[u+2*ii]+buffer[u+2*(ii+1)])/2);
                  end;
             for ii:=3300 to 4000 do buffer[u+ii]:=0;
          end else begin;
             Indicador:=true;
             for ii:=1 to 1650 do buffer[u+ii]:=Mem[ii,Imem];
             WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
             WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);
             end;
      end else begin
        If (Imem>1) and (indicador) then Imem:=Imem-1 else indicador:=False;
        If (Imem<7) and (Not indicador) then Imem:=Imem+1 else indicador:=True;
        If Imem=7 then indicador:=true;
       WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
       WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);

     If MemI[Imem,5]<>0 then begin

      IEscX:=round(nervou.memI[Imem,5])-1;
      IescY:=round(nervou.memI[Imem,6]);

     ganho:=round(nervou.memI[Imem,7]);

        If (escX[IescX]>10) then begin
         for ii:=1 to 1650 do begin
                  buffer[u+2*ii]:=Mem[ii,Imem];
                  buffer[u+2*ii+1]:= round((buffer[u+2*ii]+buffer[u+2*(ii+1)])/2);
                  end;
                 for ii:=3300 to 4000 do buffer[u+ii]:=0;
          end else begin
             for ii:=1 to 1650 do buffer[u+ii]:=Mem[ii,Imem];
             WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
             WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);
             end;
       end;
     If nRAte[Imem]>Irate then begin
      Irate:=nRate[Imem]-1;
      aumentaRate;
      end;
     If (nRate[Imem]<Irate) then begin
       Irate:=nrate[Imem]+1;
       diminueRate;
       end;
     If (Irate=nrate[Imem]) then Irate:=nRate[Imem];
     If nDur[Imem]>Iduration then begin
      Iduration:=nDur[Imem]-1;
      aumentaDuration;
      end;
     If (nDur[Imem]-IDuration)<0 then begin
       IDuration:=nDur[Imem]+1;
       diminueDuration;
       end;
     {CorrigeY;}
     DefineCalibracaoY;
     MudaY;
     OldMem:=Imem;
     Imem:=Oldmem;
     ChangeX;


if escapeRP then begin

     If (escX[IescX]>10) then
           begin
            for ii:=1 to 1650 do begin
                  buffer[u+2*ii]:=Mem[ii,Imem];
                  buffer[u+2*ii+1]:= round((buffer[u+2*ii]+buffer[u+2*(ii+1)])/2);
                  end;
                 for ii:=3300 to 4000 do buffer[u+ii]:=0;
          end else for ii:=1 to 1650 do buffer[u+ii]:=Mem[ii,Imem];
      end;
end;


    for jj:=1 to 7 do nervou.esp[jj]:=localesp[jj];
    Oldchoice:=localesp[Imem];

    if nervou.esp[Imem]<>#0 then a:=PtY[Imem]
    else a:=0;

      begin
           {setcolor(Imem);}
            {case nervou.mem[1650,imem] of
               10000  :  setcolor(15);
               5000   :  setcolor(4);
               3000   :  setcolor(3);
             end;
            mostra;
            end;}
    setcolor(15);
    Mostra;
  end;

    setfillstyle(0,1);
    marcaescolha;
   end;
end;




Procedure Recupera2;

var ii : integer;
    jj  :  integer;
    LocalEsp  :  array[1..7] of char;
    oldgain,newgain  :  integer;
    OldMem    :  Integer;
    OldDur    :  Integer;
    OldRate   :  Integer;

begin
    oldgain:=ganho;
    u:=0;
    If abs(Imem)>7 then Imem:=1;
    {Mostra;}
    with nervou do begin
     for jj:=1 to 7 do localesp[jj]:=esp[jj];
    Fixar:=false;
    setcolor(15);
    setFillStyle(9,9);
    WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
    WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,Localesp[Imem]);
    setcolor(6);
    If (Imem=7) and (not indicador) then
       begin
            Indicador:=true;
            If (escX[IescX]>10) then begin
                for ii:=1 to 1644 do begin
                  buffer[u+2*ii]:=Mem[ii,Imem];
                  buffer[u+2*ii+1]:= round((buffer[u+2*ii]+buffer[u+2*(ii+1)])/2);
                end;
                for ii:=3300 to 4000 do buffer[u+ii]:=0;
          end else begin
             Indicador:=true;
             for ii:=1 to 1644 do buffer[u+ii]:=Mem[ii,Imem];
             WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
             WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);
             end;
      end else begin
        If (Imem>1) and (indicador) then Imem:=Imem-1 else indicador:=False;
        If (Imem<7) and (Not indicador) then Imem:=Imem+1 else indicador:=True;
        If Imem=7 then indicador:=true;
       WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
       WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);

     If MemI[Imem,5]<>0 then begin

      IEscX:=round(nervou.memI[Imem,5])-1;
      IescY:=round(nervou.memI[Imem,6]);

      ganho:=round(nervou.memI[Imem,7]);

        If (escX[IescX]>10) then begin
         for ii:=1 to 1644 do begin
          for ii:=1 to 1644 do begin
                  buffer[u+2*ii]:=Mem[ii,Imem];
                  buffer[u+2*ii+1]:= round((buffer[u+2*ii]+buffer[u+2*(ii+1)])/2);
                  end;
             for ii:=3328 to 4000 do buffer[u+ii]:=0;
             end;

          end else begin
             for ii:=1 to 1644 do buffer[u+ii]:=Mem[ii,Imem];
             WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
             WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);
             end;
       end;


     If nRAte[Imem]>Irate then begin
      Irate:=nRate[Imem]-1;
      aumentaRate;
      end;
     If (nRate[Imem]<Irate) then begin
       Irate:=nrate[Imem]+1;
       diminueRate;
       end;
     If (Irate=nrate[Imem]) then Irate:=nRate[Imem];
     If nDur[Imem]>Iduration then begin
      Iduration:=nDur[Imem]-1;
      aumentaDuration;
      end;
     If (nDur[Imem]-IDuration)<0 then begin
       IDuration:=nDur[Imem]+1;
       diminueDuration;
       end;
     {CorrigeY;}
     DefineCalibracaoY;
     MudaY;
     OldMem:=Imem;
     Imem:=Oldmem;
     ChangeX;
     If (escX[IescX]>10) then
           begin
            for ii:=1 to 1644 do begin
                  buffer[2*ii]:=Mem[ii,Imem];
                  buffer[u+2*ii+1]:= (buffer[u+2*ii]+buffer[u+2*(ii+1)]) div 2;
                  end;
             for ii:=3328 to 4000 do buffer[u+ii]:=0;
           end else for ii:=1 to 1644 do buffer[u+ii]:=Mem[ii,Imem];
      end;
     for jj:=1 to 7 do nervou.esp[jj]:=localesp[jj];
     Oldchoice:=localesp[Imem];
    if nervou.esp[Imem]<>#0 then a:=PtY[Imem]
    else a:=0;
    If (nervou.esp[Imem]='f') then
    for ii:=1 to 10*EscX[IescX] do buffer[u+ii]:=buffer[u+ii] div 10;
    setcolor(7);

     if (nervou.esp[Imem]<>#0) and (nervou.esp[Imem]<>' ') then
          begin
           setcolor(Imem);
            (*case nervou.mem[1649,imem] of
               10000  :  setcolor(15);
               5000   :  setcolor(4);
               3000   :  setcolor(3);
             end;*)
            mostra;
            end;
    setcolor(15);
end;
end;






(***Procedure Recupera2;

var ii : integer;
    jj  :  integer;
    LocalEsp  :  array[1..7] of char;
    oldgain,newgain  :  integer;
    OldMem    :  Integer;
    OldDur    :  Integer;
    OldRate   :  Integer;

begin
    oldgain:=ganho;
    If abs(Imem)>7 then Imem:=1;
    {Mostra;}
    with nervou do begin
     for jj:=1 to 7 do localesp[jj]:=esp[jj];
    Fixar:=false;
    setcolor(15);
    setFillStyle(9,9);
    WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
    WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,Localesp[Imem]);
    setcolor(6);


        If (Imem=7) and (not indicador) then
      begin


             If (localesp[Imem]='f') then begin
             Indicador:=True;
             for ii:=1 to 10*EscX[IescX] do buffer[u+2*ii]:=Mem[ii,Imem] div 100;
             for ii:=10*EscX[IescX] to 4000 do buffer[u+ii]:=Mem[ii,Imem];
          end else begin
             Indicador:=true;
             for ii:=1 to 1650 do buffer[u+ii]:=Mem[ii,Imem];
             WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
             WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);
             end;


      end else begin


        If (Imem>1) and (indicador) then Imem:=Imem-1 else indicador:=False;
        If (Imem<7) and (Not indicador) then Imem:=Imem+1 else indicador:=True;
        If Imem=7 then indicador:=true;
       WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
       WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);

     If MemI[Imem,5]<>0 then begin

      IEscX:=round(nervou.memI[Imem,5])-1;
      IescY:=round(nervou.memI[Imem,6]);

      ganho:=round(nervou.memI[Imem,7]);

         If (localesp[Imem]='f') then begin
             Indicador:=True;
             for ii:=1 to 10*EscX[IescX] do buffer[u+2*ii]:=Mem[ii,Imem] div 100;
             for ii:=10*EscX[IescX] to 4000 do buffer[u+ii]:=Mem[ii,Imem];
             for ii:=1 to 1650 do buffer[u+2*ii]:=Mem[ii,Imem];
             for ii:=1651 to 4000 do buffer[u+ii]:=0;
          end else begin
             for ii:=1 to 1650 do buffer[u+ii]:=Mem[ii,Imem];
             WriteText(PosX+3,pos2Y+PosY2janCont+(Imem)*h,Int2Str(Imem));
             WriteText(PosX+320,pos2Y+PosY2janCont+(Imem)*h,esp[Imem]);
             end;
       end;


     If nRAte[Imem]>Irate then begin
      Irate:=nRate[Imem]-1;
      aumentaRate;
      end;
     If (nRate[Imem]<Irate) then begin
       Irate:=nrate[Imem]+1;
       diminueRate;
       end;
     If (Irate=nrate[Imem]) then Irate:=nRate[Imem];
     If nDur[Imem]>Iduration then begin
      Iduration:=nDur[Imem]-1;
      aumentaDuration;
      end;
     If (nDur[Imem]-IDuration)<0 then begin
       IDuration:=nDur[Imem]+1;
       diminueDuration;
       end;
     {CorrigeY;}
     DefineCalibracaoY;
     MudaY;
     OldMem:=Imem;
     Imem:=Oldmem;
     ChangeX;
if escapeRP then begin
     If (escX[IescX]>10) then
           begin
           for ii:=1 to 1650 do buffer[u+2*ii]:=Mem[ii,Imem];
          end else for ii:=1 to 1650 do buffer[u+ii]:=Mem[ii,Imem];
      end;
  end;
     for jj:=1 to 7 do nervou.esp[jj]:=localesp[jj];
     Oldchoice:=localesp[Imem];
    if nervou.esp[Imem]<>#0 then a:=PtY[Imem]
    else a:=0;
    setcolor(7);

    if (nervou.esp[Imem]<>#0) and (nervou.esp[Imem]<>' ') then
          begin
            {setcolor(Imem);}
            case nervou.mem[1650,imem] of
            0..3000  :  setcolor(3);
            5000     :  setcolor(4);
            10000    :  setcolor(15);
            end;
            mostra;
            end;
    setcolor(15);
end;
end;****)



Procedure RecuperaCon;

var ii : integer;
oldPOs :  integer;
OldV   :  integer;

begin
  with nervou do begin
  OldV:= v;
  CursorXY(m*v,a+PtInicial+10*buffer[u+EscX[IEscX]*v div 2] div calY[IEscY]);
  Recupera;
  v:=oldV;
  CursorXY(m*v,a+PtInicial+10*buffer[u+EscX[IEscX]*v div 2] div calY[IEscY]);
  {WriteText(PosX+3,posY+PosYjanCont+Imem*h,Int2Str(Imem));}
  end;
end;

Procedure RecuperaCDon(mm  :  integer);

var ii : integer;
oldV :  integer;

begin
  OldV:= v;
  Recupera;
  v:=oldV;
  CursorXY(m*v,a+PtInicial+10*buffer[u+EscX[IEscX]*v div 2] div calY[IEscY]);
  YO:=-10*buffer[u+EscX[IEscX]*XO div 2] div calY[IEscY];
  CursorXY(m*XO,a+PtInicial-YO);
 { WriteText(PosX+3,posY+PosYjanCont+mm*h,Int2Str(mm));}
end;

end.